<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>并行扩展</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../common/favicon.ico">
<link rel="stylesheet" href="../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/experimental/parallelism","wgTitle":"cpp/experimental/parallelism","wgCurRevisionId":55100,"wgArticleId":9712,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"cpp/experimental/parallelism","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_experimental_parallelism skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">并行扩展</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../cpp.html" title="cpp">cpp</a>‎ | <a href="../experimental.html" title="cpp/experimental">experimental</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em">
<tr class="t-nv"><td colspan="5"> <a href="../language.html" title="cpp/language">语言</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../header.html" title="cpp/header">标准库头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../freestanding.html" title="cpp/freestanding"> 自立与有宿主实现</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../named_req.html" title="cpp/named req">具名要求</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html#.E8.AF.AD.E8.A8.80.E6.94.AF.E6.8C.81" title="cpp/utility">语言支持库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../concepts.html" title="cpp/concepts">概念库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../error.html" title="cpp/error">诊断库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html" title="cpp/utility">工具库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../string.html" title="cpp/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../container.html" title="cpp/container">容器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../iterator.html" title="cpp/iterator">迭代器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../ranges.html" title="cpp/ranges"> 范围库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../algorithm.html" title="cpp/algorithm">算法库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../numeric.html" title="cpp/numeric">数值库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../locale.html" title="cpp/locale">本地化库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../io.html" title="cpp/io">输入/输出库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../filesystem.html" title="cpp/filesystem">文件系统库</a> <span class="t-mark-rev t-since-cxx17">(C++17)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../regex.html" title="cpp/regex">正则表达式库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../atomic.html" title="cpp/atomic">原子操作库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../thread.html" title="cpp/thread">线程支持库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="cpp/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../experimental.html" title="cpp/experimental">技术规范</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em">
<tr class="t-nv"><td colspan="5"> <a href="fs.html" title="cpp/experimental/fs">文件系统库</a> <span class="t-mark-rev t-since-fs-ts t-mark-ts">(文件系统 TS)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="lib_extensions.html" title="cpp/experimental/lib extensions">库基础</a> <span class="t-mark-rev t-since-libfund-ts t-mark-ts">(库基础 TS)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="lib_extensions_2.html" title="cpp/experimental/lib extensions 2">库基础 2</a> <span class="t-mark-rev t-since-libfund-ts-2 t-mark-ts">(库基础 TS v2)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="lib_extensions_3.html" title="cpp/experimental/lib extensions 3">库基础 3</a> <span class="t-mark-rev t-since-libfund-ts-3 t-mark-ts">(库基础 TS v3)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <strong class="selflink">并行扩展</strong> <span class="t-mark-rev t-since-parallelism-ts t-mark-ts">(并行 TS)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="parallelism_2.html" title="cpp/experimental/parallelism 2">并行扩展 2</a> <span class="t-mark-rev t-since-parallelism-ts-2 t-mark-ts">(并行 TS v2)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="concurrency.html" title="cpp/experimental/concurrency">并发扩展</a> <span class="t-mark-rev t-since-concurrency-ts t-mark-ts">(并发 TS)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/concurrency_2&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/concurrency 2（页面不存在）">并发扩展 2</a> <span class="t-mark-rev t-since-concurrency-ts-2 t-mark-ts">(并发 TS v2)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="constraints.html" title="cpp/experimental/constraints">概念</a> <span class="t-mark-rev t-since-concepts-ts t-mark-ts">(概念 TS)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="ranges.html" title="cpp/experimental/ranges">范围</a> <span class="t-mark-rev t-since-ranges-ts t-mark-ts">(范围 TS)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="reflect.html" title="cpp/experimental/reflect">反射</a> <span class="t-mark-rev t-since-reflection-ts t-mark-ts">(反射 TS)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="special_functions.html" title="cpp/experimental/special functions">数学特殊函数</a> <span class="t-mark-rev t-since-special-math-tr t-mark-ts">(特殊函数 TR)</span></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><strong class="selflink">并行扩展</strong><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em">
<tr class="t-nv-h1"><td colspan="5"> <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/execution policy（页面不存在）">执行策略</a></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy（页面不存在）"><span class="t-lines"><span>parallel::execution_policy</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy_tag_t&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy tag t（页面不存在）"><span class="t-lines"><span>parallel::sequential_execution_policy</span><span>parallel::parallel_execution_policy</span><span>parallel::parallel_vector_execution_policy</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy_tag&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy tag（页面不存在）"><span class="t-lines"><span>parallel::seq</span><span>parallel::par</span><span>parallel::par_vec</span></span></a></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/parallel_algorithms&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/parallel algorithms（页面不存在）">并行算法</a></td></tr>
<tr class="t-nv-h2"><td colspan="5">并行异常</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/exception_list&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/exception list（页面不存在）"><span class="t-lines"><span>parallel::exception_list</span></span></a></div></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/existing&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/existing（页面不存在）">既存算法的并行化版本</a> </td></tr>
<tr class="t-nv-h2"><td colspan="5">新算法</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/for_each&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/for each（页面不存在）"><span class="t-lines"><span>parallel::for_each</span><span>parallel::for_each_n</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/reduce&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/reduce（页面不存在）"><span class="t-lines"><span>parallel::reduce</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/exclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/exclusive scan（页面不存在）"><span class="t-lines"><span>parallel::exclusive_scan</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/inclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/inclusive scan（页面不存在）"><span class="t-lines"><span>parallel::inclusive_scan</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_reduce&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform reduce（页面不存在）"><span class="t-lines"><span>parallel::transform_reduce</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_exclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform exclusive scan（页面不存在）"><span class="t-lines"><span>parallel::transform_exclusive_scan</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_inclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform inclusive scan（页面不存在）"><span class="t-lines"><span>parallel::transform_inclusive_scan</span></span></a></div></div></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p><br>
C++ 并行扩展 (C++ Extensions for Parallelism) ， ISO/IEC TS 19570:2015 为 C++ 标准库定义下列新组件：
</p>
<h3><span class="mw-headline" id=".E6.89.A7.E8.A1.8C.E7.AD.96.E7.95.A5">执行策略</span></h3>
<p>并行 TS 描述三种执行策略：<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/execution policy（页面不存在）">顺序</a>、<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/execution policy（页面不存在）">并行</a>和<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/execution policy（页面不存在）">并行加向量</a>，并提供对应的执行策略类型和对象。用户可以通过以对应类型的执行策略对象调用并行算法，静态地选择执行策略，或用类型擦除的 <code>execution_policy</code> 类动态地选择执行策略。
</p><p>实现可以定义额外的执行策略为扩展。以实现定义类型执行策略对象调用并行算法的语义是实现定义的。
</p>
<table class="t-dsc-begin">

<tr class="t-dsc-header">
<td colspan="2"> <div>定义于头文件 <code><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/header/experimental/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/header/experimental/execution policy（页面不存在）">&lt;experimental/execution_policy&gt;</a></code> </div>
</td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy_tag_t&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy tag t（页面不存在）"> <span class="t-lines"><span>sequential_execution_policy</span><span>parallel_execution_policy</span><span>parallel_vector_execution_policy</span></span></a></div></div>
</td>
<td>  执行策略类型 <br> <span class="t-mark">(类)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy_tag&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy tag（页面不存在）"> <span class="t-lines"><span>seq</span><span>par</span><span>par_vec</span></span></a></div></div>
</td>
<td>  全局执行策略对象 <br> <span class="t-mark">(常量)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/execution policy（页面不存在）"> <span class="t-lines"><span>execution_policy</span></span></a></div></div>
</td>
<td>  动态执行策略 <br> <span class="t-mark">(类)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/is_execution_policy&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/is execution policy（页面不存在）"> <span class="t-lines"><span>is_execution_policy</span></span></a></div></div>
</td>
<td>  测试类是否表示执行策略 <br> <span class="t-mark">(类模板)</span>
</td></tr>

</table>
<h3><span class="mw-headline" id=".E5.BC.82.E5.B8.B8.E5.88.97.E8.A1.A8"> 异常列表 </span></h3>
<table class="t-dsc-begin">

<tr class="t-dsc-header">
<td colspan="2"> <div>定义于头文件 <code><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/header/experimental/exception_list&amp;action=edit&amp;redlink=1" class="new" title="cpp/header/experimental/exception list（页面不存在）">&lt;experimental/exception_list&gt;</a></code> </div>
</td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/exception_list&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/exception list（页面不存在）"> <span class="t-lines"><span>exception_list</span></span></a></div></div>
</td>
<td>   在并行执行期间引发的异常 <br> <span class="t-mark">(类)</span>
</td></tr>

</table>
<h3><span class="mw-headline" id=".E6.97.A2.E5.AD.98.E7.AE.97.E6.B3.95.E7.9A.84.E5.B9.B6.E8.A1.8C.E5.8C.96.E7.89.88.E6.9C.AC">既存算法的并行化版本</span></h3>
<p>该 TS 为来自 &lt;algorithm&gt; 、 &lt;numeric&gt; 和 &lt;memory&gt; 的下列 69 个算法提供<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism/existing&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/parallelism/existing（页面不存在）">并行化版本</a>：
</p>
<div style="margin-left:0px">
<table class="mw-collapsible mw-collapsed" style="background: transparent; text-align: left; border: 1px solid silver; margin: 0.2em auto auto; width:100%; clear: both; padding: 1px;">

<tr>
<th style="background: #F0F2F5; font-size:87%; padding:0.2em 0.3em; text-align:center;"> <span style="font-size:115%">提供了并行化版本的标准库算法</span>
</th></tr>
<tr>
<td style="border: solid 1px silver; padding: 8px; background: white;">
<div class="div-col columns column-count column-count-3" style="-moz-column-count: 3; -webkit-column-count: 3; column-count: 3;">
<ul><li> <span class="t-lc"><a href="../algorithm/adjacent_difference.html" title="cpp/algorithm/adjacent difference">std::adjacent_difference</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/adjacent_find.html" title="cpp/algorithm/adjacent find">std::adjacent_find</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/all_any_none_of.html" title="cpp/algorithm/all any none of">std::all_of</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/all_any_none_of.html" title="cpp/algorithm/all any none of">std::any_of</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/copy.html" title="cpp/algorithm/copy">std::copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/copy.html" title="cpp/algorithm/copy">std::copy_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/copy_n.html" title="cpp/algorithm/copy n">std::copy_n</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/count_if.html" title="cpp/algorithm/count">std::count</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/count_if.html" title="cpp/algorithm/count">std::count_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/equal.html" title="cpp/algorithm/equal">std::equal</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/fill.html" title="cpp/algorithm/fill">std::fill</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/fill_n.html" title="cpp/algorithm/fill n">std::fill_n</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/find_if_not.html" title="cpp/algorithm/find">std::find</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/find_end.html" title="cpp/algorithm/find end">std::find_end</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/find_first_of.html" title="cpp/algorithm/find first of">std::find_first_of</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/find_if_not.html" title="cpp/algorithm/find">std::find_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/find_if_not.html" title="cpp/algorithm/find">std::find_if_not</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/generate.html" title="cpp/algorithm/generate">std::generate</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/generate_n.html" title="cpp/algorithm/generate n">std::generate_n</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/includes.html" title="cpp/algorithm/includes">std::includes</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/inner_product.html" title="cpp/algorithm/inner product">std::inner_product</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/inplace_merge.html" title="cpp/algorithm/inplace merge">std::inplace_merge</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/is_heap.html" title="cpp/algorithm/is heap">std::is_heap</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/is_heap_until.html" title="cpp/algorithm/is heap until">std::is_heap_until</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/is_partitioned.html" title="cpp/algorithm/is partitioned">std::is_partitioned</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/is_sorted.html" title="cpp/algorithm/is sorted">std::is_sorted</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/is_sorted_until.html" title="cpp/algorithm/is sorted until">std::is_sorted_until</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/lexicographical_compare.html" title="cpp/algorithm/lexicographical compare">std::lexicographical_compare</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/max_element.html" title="cpp/algorithm/max element">std::max_element</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/merge.html" title="cpp/algorithm/merge">std::merge</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/min_element.html" title="cpp/algorithm/min element">std::min_element</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/minmax_element.html" title="cpp/algorithm/minmax element">std::minmax_element</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/mismatch.html" title="cpp/algorithm/mismatch">std::mismatch</a></span>
</li><li> <a href="../algorithm/move.html" title="cpp/algorithm/move"><tt>std::move</tt></a>
</li><li> <span class="t-lc"><a href="../algorithm/all_any_none_of.html" title="cpp/algorithm/all any none of">std::none_of</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/nth_element.html" title="cpp/algorithm/nth element">std::nth_element</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/partial_sort.html" title="cpp/algorithm/partial sort">std::partial_sort</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/partial_sort_copy.html" title="cpp/algorithm/partial sort copy">std::partial_sort_copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/partition.html" title="cpp/algorithm/partition">std::partition</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/partition_copy.html" title="cpp/algorithm/partition copy">std::partition_copy</a></span>
</li><li> <a href="../algorithm/remove.html" title="cpp/algorithm/remove"><tt>std::remove</tt></a>
</li><li> <span class="t-lc"><a href="../algorithm/remove_copy.html" title="cpp/algorithm/remove copy">std::remove_copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/remove_copy.html" title="cpp/algorithm/remove copy">std::remove_copy_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/remove.html" title="cpp/algorithm/remove">std::remove_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/replace.html" title="cpp/algorithm/replace">std::replace</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/replace_copy_if.html" title="cpp/algorithm/replace copy">std::replace_copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/replace_copy_if.html" title="cpp/algorithm/replace copy">std::replace_copy_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/replace.html" title="cpp/algorithm/replace">std::replace_if</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/reverse.html" title="cpp/algorithm/reverse">std::reverse</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/reverse_copy.html" title="cpp/algorithm/reverse copy">std::reverse_copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/rotate.html" title="cpp/algorithm/rotate">std::rotate</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/rotate_copy.html" title="cpp/algorithm/rotate copy">std::rotate_copy</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/search.html" title="cpp/algorithm/search">std::search</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/search_n.html" title="cpp/algorithm/search n">std::search_n</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/set_difference.html" title="cpp/algorithm/set difference">std::set_difference</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/set_intersection.html" title="cpp/algorithm/set intersection">std::set_intersection</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/set_symmetric_difference.html" title="cpp/algorithm/set symmetric difference">std::set_symmetric_difference</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/set_union.html" title="cpp/algorithm/set union">std::set_union</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/sort.html" title="cpp/algorithm/sort">std::sort</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/stable_partition.html" title="cpp/algorithm/stable partition">std::stable_partition</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/stable_sort.html" title="cpp/algorithm/stable sort">std::stable_sort</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/swap_ranges.html" title="cpp/algorithm/swap ranges">std::swap_ranges</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/transform.html" title="cpp/algorithm/transform">std::transform</a></span>
</li><li> <span class="t-lc"><a href="../memory/uninitialized_copy.html" title="cpp/memory/uninitialized copy">std::uninitialized_copy</a></span>
</li><li> <span class="t-lc"><a href="../memory/uninitialized_copy_n.html" title="cpp/memory/uninitialized copy n">std::uninitialized_copy_n</a></span>
</li><li> <span class="t-lc"><a href="../memory/uninitialized_fill.html" title="cpp/memory/uninitialized fill">std::uninitialized_fill</a></span>
</li><li> <span class="t-lc"><a href="../memory/uninitialized_fill_n.html" title="cpp/memory/uninitialized fill n">std::uninitialized_fill_n</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/unique.html" title="cpp/algorithm/unique">std::unique</a></span>
</li><li> <span class="t-lc"><a href="../algorithm/unique_copy.html" title="cpp/algorithm/unique copy">std::unique_copy</a></span>
</li></ul>
</div>
</td></tr></table></div>
<h3><span class="mw-headline" id=".E6.96.B0.E7.AE.97.E6.B3.95">新算法</span></h3>
<table class="t-dsc-begin">

<tr class="t-dsc-header">
<td colspan="2"> <div>定义于头文件 <code><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/header/experimental/algorithm&amp;action=edit&amp;redlink=1" class="new" title="cpp/header/experimental/algorithm（页面不存在）">&lt;experimental/algorithm&gt;</a></code> </div>
</td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/for_each&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/for each（页面不存在）"> <span class="t-lines"><span>for_each</span></span></a></div></div>
</td>
<td>  类似 <span class="t-lc"><a href="../algorithm/for_each.html" title="cpp/algorithm/for each">std::for_each</a></span> ，除了返回 void <br> <span class="t-mark">(函数模板)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/for_each_n&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/for each n（页面不存在）"> <span class="t-lines"><span>for_each_n</span></span></a></div></div>
</td>
<td>  应用函数对象到序列的首 n 个元素 <br> <span class="t-mark">(函数模板)</span>
</td></tr>


<tr class="t-dsc-header">
<td colspan="2"> <div>定义于头文件 <code><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/header/experimental/numeric&amp;action=edit&amp;redlink=1" class="new" title="cpp/header/experimental/numeric（页面不存在）">&lt;experimental/numeric&gt;</a></code> </div>
</td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/reduce&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/reduce（页面不存在）"> <span class="t-lines"><span>reduce</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-parallelism-ts t-mark-ts">(并行 TS)</span></span></span></div></div>
</td>
<td>  类似 <span class="t-lc"><a href="../algorithm/accumulate.html" title="cpp/algorithm/accumulate">std::accumulate</a></span> ，除了不按顺序 <br> <span class="t-mark">(函数模板)</span> </td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/exclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/exclusive scan（页面不存在）"> <span class="t-lines"><span>exclusive_scan</span></span></a></div></div>
</td>
<td>  类似 <span class="t-lc"><a href="../algorithm/partial_sum.html" title="cpp/algorithm/partial sum">std::partial_sum</a></span> ，从第 i 个和排除第 i 个输入元素 <br> <span class="t-mark">(函数模板)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/inclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/inclusive scan（页面不存在）"> <span class="t-lines"><span>inclusive_scan</span></span></a></div></div>
</td>
<td>  类似 <span class="t-lc"><a href="../algorithm/partial_sum.html" title="cpp/algorithm/partial sum">std::partial_sum</a></span> ，包含第 i 个元素于第 i 个和 <br> <span class="t-mark">(函数模板)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_reduce&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform reduce（页面不存在）"> <span class="t-lines"><span>transform_reduce</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-parallelism-ts t-mark-ts">(并行 TS)</span></span></span></div></div>
</td>
<td>  应用函数对象，然后不按顺序规约 <br> <span class="t-mark">(函数模板)</span> </td></tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_exclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform exclusive scan（页面不存在）"> <span class="t-lines"><span>transform_exclusive_scan</span></span></a></div></div>
</td>
<td>  应用函数对象，再计算 exclusive_scan <br> <span class="t-mark">(函数模板)</span>
</td></tr>


<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/transform_inclusive_scan&amp;action=edit&amp;redlink=1" class="new" title="cpp/experimental/transform inclusive scan（页面不存在）"> <span class="t-lines"><span>transform_inclusive_scan</span></span></a></div></div>
</td>
<td>  应用函数对象，再计算 inclusive_scan <br> <span class="t-mark">(函数模板)</span>
</td></tr>

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 3675/1000000
Preprocessor generated node count: 8141/1000000
Post‐expand include size: 94882/2097152 bytes
Template argument size: 19709/2097152 bytes
Highest expansion depth: 20/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:9712-0!*!0!!zh!2!zh!* and timestamp 20211022205145 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism&amp;oldid=55100">https://zh.cppreference.com/mwiki/index.php?title=cpp/experimental/parallelism&amp;oldid=55100</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/cpp/experimental/parallelism">Online version</a></li><li>Offline version retrieved 2022-01-01 00:37.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2018年6月9日 (星期六) 02:55。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过6,441次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 1.281 secs. -->
	</body>
<!-- Cached 20211022205145 -->
</html>